<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: GData::Auth::ClientLogin</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">GData::Auth::ClientLogin</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/lib/gdata/auth/clientlogin_rb.html">
                lib/gdata/auth/clientlogin.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
This class implements <a href="ClientLogin.html">ClientLogin</a> signatures
for Data API requests. It can be used with a <a
href="../../GData.html">GData::Client::GData</a> object.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000055">get_token</a>&nbsp;&nbsp;
      <a href="#M000054">new</a>&nbsp;&nbsp;
      <a href="#M000056">sign_request!</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">account_type</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
One of &#8216;HOSTED_OR_GOOGLE&#8217;, &#8216;GOOGLE&#8217;, or
&#8216;HOSTED&#8217;. See documentation here: <a
href="http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html">code.google.com/apis/accounts/docs/AuthForInstalledApps.html</a>

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">auth_url</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The <a href="ClientLogin.html">ClientLogin</a> authentication handler

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">service</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The service name for the API you are working with

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">token</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc">
The access token

</td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000054" class="method-detail">
        <a name="M000054"></a>

        <div class="method-heading">
          <a href="ClientLogin.src/M000054.html" target="Code" class="method-signature"
            onclick="popupCode('ClientLogin.src/M000054.html');return false;">
          <span class="method-name">new</span><span class="method-args">(service, options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Initialize the class with the service name of an API that you wish to
request a token for.
</p>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000055" class="method-detail">
        <a name="M000055"></a>

        <div class="method-heading">
          <a href="ClientLogin.src/M000055.html" target="Code" class="method-signature"
            onclick="popupCode('ClientLogin.src/M000055.html');return false;">
          <span class="method-name">get_token</span><span class="method-args">(username, password, source, login_token = nil, login_captcha = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Retrieves a token for the given username and password. source identifies
your application. login_token and login_captcha are used only if you are
responding to a previously issued CAPTCHA challenge.
</p>
        </div>
      </div>

      <div id="method-M000056" class="method-detail">
        <a name="M000056"></a>

        <div class="method-heading">
          <a href="ClientLogin.src/M000056.html" target="Code" class="method-signature"
            onclick="popupCode('ClientLogin.src/M000056.html');return false;">
          <span class="method-name">sign_request!</span><span class="method-args">(request)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates an appropriate Authorization header on a <a
href="../HTTP/Request.html">GData::HTTP::Request</a> object.
</p>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>